<template>

  <!-- 准备一个 echarts 渲染的 DOM 节点 -->
  <div ref="radarRef" style="width: 400px;height: 450px;" />

</template>

<script>
// 导入 echarts
import * as echarts from 'echarts'

export default {
  name: 'MyRadar',
  mounted() {
    var chartDom = this.$refs.radarRef
    var myChart = echarts.init(chartDom)
    var option

    option = {
      title: {
        text: '人力资源基础绩效表'
      },

      radar: {
        // shape: 'circle',
        indicator: [
          { name: '工作效率', max: 100 },
          { name: '考勤', max: 100 },
          { name: '积极性', max: 100 },
          { name: '帮助同事', max: 100 },
          { name: '自主学习', max: 100 },
          { name: '正确率', max: 100 }
        ]
      },
      series: [
        {
          name: '平均 vs 个人',
          type: 'radar',
          data: [
            {
              value: [80, 80, 80, 80, 80, 80],
              name: '平均水平'
            },
            {
              value: [90, 75, 95, 90, 95, 90],
              name: '个人价值'
            }
          ]
        }
      ]
    }

    option && myChart.setOption(option)
  }
}

</script>

<style>

</style>
